﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace ProductService.Controllers
{
    public class BaseController : Controller
    {
        public JsonResult Success(dynamic dyn = null)
        {
            return Json(new { code = 0, msg = "成功", data = dyn });
        }


        public JsonResult Fail(dynamic dyn)
        {
            return Json(new { code = -999, msg = dyn });
        }

        [HttpGet("/api/Base/CheckHealth")]
        public JsonResult CheckHealth()
        {
            return Json(new { state = true });
        }
    }
}